		// This is the VGA driver.
		//Written by Kaustubh Srivastava.
		
		//List of Ports
		//60	out 	bit 0: 		vga_command 	VGA monitor
		//61	in 		bit 0: 		vga_response
		//62	out 	bit 0: 		vga_write
		//63	out 	bits 9-0: 	vga_x1[9:0]
		//64	out 	bits 8-0: 	vga_y1[8:0]
		//65	out 	bits 9-0: 	vga_x2[9:0]
		//66	out 	bits 8-0: 	vga_y2[8:0]
		//67	out 	bit 7-0: 	vga_color_write[7:0]
		//68	in 		bit 7-0: 	vga_color_read[7:0] 
				
VGA				out 62 vga_write				//Prepare the data to be sent.
				out 63 vga_x1
				out 64 vga_y1
				out 65 vga_x2
				out 66 vga_y2
				out	67 vga_color_write
		
	
				out 60 on
	
VGA_loop		in 61 response					//Look for the response signal from the VGA.

				be VGA_loop response off
	
				be VGA_stop	vga_write on		//Do not retrieve the value from port 68 if
				
				in 68 vga_color_read			//vga_write is a one (on).
	
VGA_stop		out 60 off						//Now turn the command signal off.
	
VGA_loop2 		in 61 response					//Look for the response signal.
				be VGA_loop2 response on		//End the driver when the VGA's response signal is off.
		
				ret VGA_return

vga_write		.data 0	
vga_x1			.data 0
vga_y1			.data 0
vga_x2			.data 0
vga_y2			.data 0
vga_color_read	.data 0
vga_color_write	.data 0

on				.data 1
off				.data 0

response		.data 0
VGA_return		.data 0
